package com.hitalkie.teacher.model;

import android.text.TextUtils;

import com.hitalkie.teacher.app.TalkieApplication;

/**
 * Date 06/11/2016
 *
 * @author charliema
 */

public class Notification extends BaseModel {

    public long id;
    public String create_time;
    public String create_time_formatted; //  测试使用
    public int status;   // notification状态
    public int type;
    public String title_zh;
    public String title_en;
    public String detail_zh;
    public String detail_en;
    public String href;  //  如果改notification点击后跳转则有
    public long expire_time;  //  该条信息的过期时间，超过过期时间客户端即使未读也不弹提示
    public long ext_id; // 该条消息对应的第三方id

    public String getTitle() {
        return TextUtils.equals(TalkieApplication.getLanguage(), "en") ? title_en : title_zh;
    }

    public String getDetail() {
        return TextUtils.equals(TalkieApplication.getLanguage(), "en") ? detail_en : detail_zh;

    }
}
